www.gusucode.com > 云网互动影视系统(12套模版和资源联盟) 6.2 > 云网互动影视系统(12套模版和资源联盟) 6.2.4/免费版/Function/Labeling.asp

    <%
'===================================================================================================================
'软件名称:云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ:489234,2813712
'程序版权:云网互动科技有限公司
'程序开发:云网互动科技有限公司
'官方网站:http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================

function LogoLeb(LogoWidth,LogoHeight)
		LogoLeb="<a href="""&GetConfig("Weburl")&""" title=""网站Logo""><img src="""&GetConfig("WebLogo")&""" width="""&LogoWidth&""" height="""&LogoHeight&""" border=""0""></a>"
end function

function typeLeb(typeid,containSubClass,Region,Style,Volume,TdVolume,Attribute,picwidth,picheight,ShowTitle,TitleVolume,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		If typeid<>"" Then 
		If containSubClass<>"" Then
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
		sql=sql&" TypeID in ("&typeidW&") AND"
		Else
		sql=sql&" TypeID = "&typeid&" AND"
		End If
		End If
 		If Region<>"" Then sql=sql&" MovieRegion="&Region&" AND"
 		IF Attribute<>"" Then
 		If Attribute=1 Then sql=sql&" MovieSuggest=1 AND"
 		If Attribute=2 Then sql=sql&" MovieHot=1 AND"
 		If Attribute=3 Then sql=sql&" MovieSerialization=1 AND"
		If Attribute=4 Then sql=sql&" MovieFree=1 AND"
 		End If
 		If right(sql,5)="WHERE" then sql=left(sql,clng(len(sql))-5) '解决所有参数都为空的情况
 		If right(sql,3)="AND" then sql=left(sql,clng(len(sql))-3) '去掉参数最后的and
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		typeLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		typeLeb=typeLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&ClassNameE(RS("Typeid"))&"."&GetConfig("WebHtmlMode")
		end Select
		i=i+1
		Select Case Style
		Case 1
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
        typeLeb=typeLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 2
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
		typeLeb=typeLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></td></a>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 3
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        typeLeb=typeLeb&"</tr>" &vbcrlf
       	typeLeb=typeLeb&"</table></td>" &vbcrlf
		typeLeb=typeLeb&"</tr><tr>" &vbcrlf
        typeLeb=typeLeb&"<td align=""center"" valign=""top"">"
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		typeLeb=typeLeb&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        typeLeb=typeLeb&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        typeLeb=typeLeb&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        typeLeb=typeLeb&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        typeLeb=typeLeb&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		Case 4
		typeLeb=typeLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""0"">" &vbcrlf
        typeLeb=typeLeb&"<tr>" &vbcrlf
		if ShowRegion<>"" then
        typeLeb=typeLeb&"<td width=""70"" style=""line-height: 20px;"">["&RegionName(RS("MovieRegion"),OpenS)&"]</td>" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"<td width=""50"" style=""line-height: 20px;"">["&ClassName(RS("TypeID"),classurl,OpenS)&"]</td>" &vbcrlf
		end if
		if ShowTitle<>"" then
		typeLeb=typeLeb&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		end if
		if ShowDate<>"" then
        typeLeb=typeLeb&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		end if
  		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table></td>" &vbcrlf
		end Select
		if i mod TdVolume = 0 then typeLeb=typeLeb&"</tr><tr>" &vbcrlf
		RS.movenext
		loop
		RS.close
		Set RS = Nothing
		typeLeb=typeLeb&"</tr>" &vbcrlf
		typeLeb=typeLeb&"</table>"
end function

function ListLeb(typeid,Volume,TdVolume,TitleVolume,picwidth,picheight,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i,int_RPP
		int_RPP=Volume
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
 		sql=sql&" AND TypeID in ("&typeidW&")"
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		ListLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		ListLeb=ListLeb&"<tr>" &vbcrlf
		if not Rs.eof then
		Rs.PageSize=int_RPP
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo
		for i=1 to int_RPP
	 	if Rs.eof Then exit For
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&ClassNameE(RS("Typeid"))&"."&GetConfig("WebHtmlMode")
		end Select
		ListLeb=ListLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        ListLeb=ListLeb&"<tr>" &vbcrlf
        ListLeb=ListLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        ListLeb=ListLeb&"<tr>" &vbcrlf
        ListLeb=ListLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        ListLeb=ListLeb&"</tr>" &vbcrlf
       	ListLeb=ListLeb&"</table></td>" &vbcrlf
        ListLeb=ListLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		ListLeb=ListLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		if ShowActor<>"" then
		ListLeb=ListLeb&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        ListLeb=ListLeb&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        ListLeb=ListLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        ListLeb=ListLeb&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        ListLeb=ListLeb&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        ListLeb=ListLeb&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        ListLeb=ListLeb&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then ListLeb=ListLeb&"</tr><tr>" &vbcrlf
		RS.movenext
		next
		end if
		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"<tr align=""right"">" &vbcrlf
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		ListLeb=ListLeb&"<td colspan="""&TdVolume&""">"&fPageCount(Rs,cPageNo)&"</td>" &vbcrlf
		case else
		session("page")=Rs.PageCount
		ListLeb=ListLeb&"<td colspan="""&TdVolume&""">"&fPageCounthtml(Rs,cPageNo,ClassNameEHtml)&"</td>" &vbcrlf
		end Select
		ListLeb=ListLeb&"</tr>" &vbcrlf
		ListLeb=ListLeb&"</table>"
		RS.close
		Set RS = Nothing
end function

function SearchLeb(Searchtype,Keyword,Volume,TdVolume,TitleVolume,picwidth,picheight,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i,int_RPP
		int_RPP=Volume
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		Select Case Searchtype
		Case 1
		if dbtype=1 then
		sql=sql&" and MovieName Like '%"&Keyword&"%'"
		else
		sql=sql&" and InStr(1,LCase(MovieName),LCase('"&keyword&"'),0)<>0"
		end if
		Case 2
		if dbtype=1 then
		sql=sql&" and MovieActor Like '%"&Keyword&"%'"
		else
		sql=sql&" and InStr(1,LCase(MovieActor),LCase('"&keyword&"'),0)<>0"
		end if
		Case 3
		if dbtype=1 then
		sql=sql&" and (MovieName Like '%"&Keyword&"%' or MovieActor Like '%"&Keyword&"%' or MovieContent Like '%"&Keyword&"%')"
		else
		sql=sql&" and (InStr(1,LCase(MovieName),LCase('"&keyword&"'),0)<>0 or InStr(1,LCase(MovieActor),LCase('"&keyword&"'),0)<>0 or InStr(1,LCase(MovieContent),LCase('"&keyword&"'),0)<>0)"
		end if
		Case 4
		sql=sql&" and MovieRegion="&Keyword&""
		end Select
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		SearchLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		SearchLeb=SearchLeb&"<tr>" &vbcrlf
		if Rs.eof then
	   	SearchLeb=SearchLeb&"<TD colspan="""&TdVolume&""">没有找到您要搜索的内容。</TD>"
		else
		Rs.PageSize=int_RPP
		cPageNo=Request.QueryString("Page")
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo
		for i=1 to int_RPP
	 	if Rs.eof Then exit For
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&ClassNameE(RS("Typeid"))&"."&GetConfig("WebHtmlMode")
		end Select
		SearchLeb=SearchLeb&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        SearchLeb=SearchLeb&"<tr>" &vbcrlf
        SearchLeb=SearchLeb&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        SearchLeb=SearchLeb&"<tr>" &vbcrlf
        SearchLeb=SearchLeb&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        SearchLeb=SearchLeb&"</tr>" &vbcrlf
       	SearchLeb=SearchLeb&"</table></td>" &vbcrlf
        SearchLeb=SearchLeb&"<td valign=""top"" style=""line-height: 20px;"">"
		SearchLeb=SearchLeb&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		if ShowActor<>"" then
		SearchLeb=SearchLeb&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        SearchLeb=SearchLeb&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        SearchLeb=SearchLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        SearchLeb=SearchLeb&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        SearchLeb=SearchLeb&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        SearchLeb=SearchLeb&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        SearchLeb=SearchLeb&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then SearchLeb=SearchLeb&"</tr><tr>" &vbcrlf
		RS.movenext
		next
		end if
		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"<tr align=""right"">" &vbcrlf
		SearchLeb=SearchLeb&"<td colspan="""&TdVolume&""">"&fPageCount(Rs,cPageNo)&"</td>" &vbcrlf
		SearchLeb=SearchLeb&"</tr>" &vbcrlf
		SearchLeb=SearchLeb&"</table>"
		RS.close
		Set RS = Nothing
end function

function AllLeb(typeid,TdVolume,TitleVolume,TitleStyle,Sorting,OpenStyle)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select id,TypeID,MovieName,MovieDate from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1"
		if typeid<>"" then
		sql=sql&"and TypeID="&typeid
		end if
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		AllLeb="<table width=""100%""  border=""0"" cellspacing=""5"" cellpadding=""0"">"
  		AllLeb=AllLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		end Select
		i=i+1
		AllLeb=AllLeb&"<td style=""line-height: 20px;""><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		if i mod TdVolume = 0 then AllLeb=AllLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		AllLeb=AllLeb&"</tr>" &vbcrlf
		AllLeb=AllLeb&"</table>"
end function

function WithLeb(typeid,containSubClass,Region,Sorting,Volume,TdVolume,TrHeight,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhotoXz,DhPhoto,HjPhoto)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" ID,MovieName,MovieDate from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		If typeid<>"" Then 
		If containSubClass<>"" Then
		typeidW=typeid&","&ClassIDIN(typeid)
		typeidW=left(typeidW,len(typeidW)-1)
		sql=sql&" TypeID in ("&typeidW&") AND"
		Else
		sql=sql&" TypeID = "&typeid&" AND"
		End If
		End If
 		If Region<>"" Then sql=sql&" MovieRegion="&Region&" AND"
 		If right(sql,5)="WHERE" then sql=left(sql,clng(len(sql))-5) '解决所有参数都为空的情况
 		If right(sql,3)="AND" then sql=left(sql,clng(len(sql))-3) '去掉参数最后的and
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		WithLeb="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		WithLeb=WithLeb&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		end Select
		i=i+1
		WithLeb=WithLeb&"<td><table width=""100%"" height="""&TrHeight&""" border=""0"" cellspacing=""0"" cellpadding=""0"">" &vbcrlf
        WithLeb=WithLeb&"<tr>" &vbcrlf
		if DhPhotoXz=0 then
        WithLeb=WithLeb&"<td width=""30"">"&i&"</td>" &vbcrlf
		else
        WithLeb=WithLeb&"<td width=""30""><img src="""&Replace(DhPhoto,"[I]",i)&""" border=""0""></td>" &vbcrlf
		end if
		WithLeb=WithLeb&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		if ShowDate<>"" then
        WithLeb=WithLeb&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		Hjcolspan=3
		else
		Hjcolspan=2
		end if
  		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"<tr>" &vbcrlf
 		WithLeb=WithLeb&"<td colspan="""&Hjcolspan&""" height=""1"" background="""&HjPhoto&"""></td>" &vbcrlf
  		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"</table></td>" &vbcrlf
		if i mod TdVolume = 0 then WithLeb=WithLeb&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		WithLeb=WithLeb&"</tr>" &vbcrlf
		WithLeb=WithLeb&"</table>"
end function

function MovieLeb(movc,Content)
On Error Resume Next
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		classurl="class.asp?id="&movc(1,0)
		Case else
		classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&ClassNameE(movc(1,0))&"."&GetConfig("WebHtmlMode")
		end Select
		Content=Replace(Content, "{$GetTypeID}", ClassName(movc(1,0),classurl,"target=""_blank"""))
		Content=Replace(Content, "{$GetMovieName}", movc(2,0))
		Content=Replace(Content, "{$GetMovieActor}", Actor(movc(3,0),"","target=""_blank"""))
		Content=Replace(Content, "{$GetMovieRegion}", RegionName(movc(4,0),"target=""_blank"""))
		Content=Replace(Content, "{$GetMovieCoin}", movc(6,0))
		Content=Replace(Content, "{$GetMovieContent}", movc(11,0))
		Content=Replace(Content, "{$GetMovieDate}", movc(12,0))
		if movc(13,0)=1 then
		Content=Replace(Content, "{$GetMovieGroup}", GetUserGroup(movc(14,0)))
		else
		Content=Replace(Content, "{$GetMovieGroup}", "所有会员")
		end if
		MovieLeb=Content
end function
function GetMovieClick()
		GetMovieClick=GetMovieClick&"<script language=""JavaScript"" src="""&GetConfig("WebiInstallDir")&"Function/ajaxrequest.js""></script>"
		GetMovieClick=GetMovieClick&"<span id=""MovieClick""><img src="""&GetConfig("WebiInstallDir")&"Function/Images/wait.gif"" border=""0"">正在读取</span>" &vbcrlf
		GetMovieClick=GetMovieClick&"<Script language=""JavaScript"">" &vbcrlf
		GetMovieClick=GetMovieClick&"function mycallback(obj) {" &vbcrlf
		GetMovieClick=GetMovieClick&"document.getElementById(""MovieClick"").innerHTML=obj.responseText;" &vbcrlf
		GetMovieClick=GetMovieClick&"}" &vbcrlf
		GetMovieClick=GetMovieClick&"var ajax=new AJAXRequest({" &vbcrlf
		GetMovieClick=GetMovieClick&"url: """&GetConfig("WebiInstallDir")&"Function/MovieClick.asp?id="&movc(0,0)&"""," &vbcrlf
		GetMovieClick=GetMovieClick&"method: ""GET""," &vbcrlf
		GetMovieClick=GetMovieClick&"oncomplete: mycallback," &vbcrlf
		GetMovieClick=GetMovieClick&"charset: ""GB2312""" &vbcrlf
		GetMovieClick=GetMovieClick&"});" &vbcrlf
		GetMovieClick=GetMovieClick&"ajax.get();" &vbcrlf
        GetMovieClick=GetMovieClick&"</script>"
end function
function GetMoviePic(picwidth,picheight)
		GetMoviePic="<img src="""&movc(5,0)&""" width="""&picwidth&""" height="""&picheight&""">"
end function
function MovieErrors(ErrorsType,ErrorsStyle)
url="javascript:window.open('"&GetConfig("WebiInstallDir")&"Users/Users_MovieErrors.asp?ErrorsMovie="&movc(2,0)&"','Errors','scrollbars=0,resizable=0,width=500,height=320,menubar=0,top=168,left=168')"
Select Case ErrorsType
		Case 0
MovieErrors="<a class="""&ErrorsStyle&""" href=""#"" onclick="""&url&""">影片报错</a>"
		Case 1
MovieErrors="<input name=""submit"" type=""button"" onclick="""&url&""" class="""&ErrorsStyle&""" value=""影片报错"">"
		Case 2
MovieErrors="<input name=""Submit"" type=""image"" onclick="""&url&""" src="""&ErrorsStyle&""">"
end Select
end function
function MovieCollection(CollectionType,CollectionStyle)
url="javascript:window.open('"&GetConfig("WebiInstallDir")&"Users/Users_MovieCollection.asp?CollectionMoiveID="&movc(0,0)&"','MovieCollection','scrollbars=0,resizable=0,width=500,height=320,menubar=0,top=168,left=168')"
Select Case CollectionType
		Case 0
MovieCollection="<a class="""&CollectionStyle&""" href=""#"" onclick="""&url&""">收藏影片</a>"
		Case 1
MovieCollection="<input name=""submit"" type=""button"" onclick="""&url&""" class="""&CollectionStyle&""" value=""收藏影片"">"
		Case 2
MovieCollection="<input name=""Submit"" type=""image"" onclick="""&url&""" src="""&CollectionStyle&""">"
end Select
end function
function PromotionForm(textshow,textStyle,PromotionStyle)
PromotionForm=PromotionForm&"<script language=""javascript"">" &vbcrlf
PromotionForm=PromotionForm&"function MM_findObj(n, d) {" &vbcrlf
PromotionForm=PromotionForm&"var p,i,x; if(!d) d=document; if((p=n.indexOf(""?""))>0&&parent.frames.length) {" &vbcrlf
PromotionForm=PromotionForm&"d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}" &vbcrlf
PromotionForm=PromotionForm&"if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];" &vbcrlf
PromotionForm=PromotionForm&"for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);" &vbcrlf
PromotionForm=PromotionForm&"if(!x && document.getElementById) x=document.getElementById(n); return x;" &vbcrlf
PromotionForm=PromotionForm&"}" &vbcrlf
PromotionForm=PromotionForm&"function JM_cc(ob){" &vbcrlf
PromotionForm=PromotionForm&"var obj=MM_findObj(ob); if (obj) {" &vbcrlf
PromotionForm=PromotionForm&"obj.select();js=obj.createTextRange();js.execCommand(""Copy"");}" &vbcrlf
PromotionForm=PromotionForm&"alert(""复制成功!您可以将本片推荐给你QQ或者论坛上的朋友欣赏!"");" &vbcrlf
PromotionForm=PromotionForm&"}" &vbcrlf
PromotionForm=PromotionForm&"document.write('<input name=""page_url"" value=""'+location.href+'"" type="""&textshow&""" readonly class="""&TextStyle&""">"
PromotionForm=PromotionForm&"<input "
if IsPicTF(PromotionStyle)=True then 
PromotionForm=PromotionForm&"type=""image"" src="""&PromotionStyle&""" "
else 
PromotionForm=PromotionForm&"type=""button"" class="""&PromotionStyle&""" value=""复制"" "
end if
PromotionForm=PromotionForm&"onClick=JM_cc(""page_url"")>');" &vbcrlf
PromotionForm=PromotionForm&"</script>" &vbcrlf
end function
function MovieScore(ScoreType,BgColor)
		MovieScore="<iframe src="""&GetConfig("WebiInstallDir")&"function/pinfen.asp?pf_id="&movc(0,0)&"&Action="&ScoreType&"&BgColor="&Replace(BgColor,"#","")&""" frameborder=""0"" width=""100%"" height=""100%"" scrollong=""no"" marginheight=""0"" marginwidth=""0""></iframe>"
end function
function MovieRelated(Style,Volume,TdVolume,picwidth,picheight,ShowTitle,TitleVolume,TitleStyle,ShowActor,ActorVolume,Showtype,ShowRegion,ShowClick,ShowCoin,ShowDate,ShowContent,ContentVolume,Sorting,OpenStyle,BgColor,BgPic,BorderColor)
		dim i
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select top "&Volume&" * from YWNT_TMS_Movie WHERE MovieHide=0 and MovieRecovery=0 and MovieAudit=1 AND"
 		sql=sql&" TypeID="&movc(1,0)&" AND"
 		sql=sql&" ID<>"&movc(0,0)&""
		Select Case Sorting
		Case 1
		sql=sql&" Order by ID desc"
		Case 2
		sql=sql&" Order by ID asc"
		Case 3
		sql=sql&" Order by MovieDate desc,id desc"
		Case 4
		sql=sql&" Order by MovieDate asc,id asc"
		Case 5
		sql=sql&" Order by MovieClick desc,id desc"
		Case 6
		sql=sql&" Order by MovieClick asc,id asc"
		end Select
		Rs.open sql,Conn,1,1
		MovieRelated="<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"
  		MovieRelated=MovieRelated&"<tr>" &vbcrlf
		do while not RS.eof
		if OpenStyle=1 then
		OpenS="target=""_blank"""
		end if
		Select Case GetConfig("WebHtmlMode")
		Case "asp"
		movieurl="movie.asp?id="&RS("id")
		classurl="class.asp?id="&RS("Typeid")
		Case else
		movieurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"movie_"&RS("id")&"."&GetConfig("WebHtmlMode")
		classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&ClassNameE(RS("Typeid"))&"."&GetConfig("WebHtmlMode")
		end Select		
		i=i+1
		Select Case Style
		Case 1
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
        MovieRelated=MovieRelated&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        MovieRelated=MovieRelated&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 2
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        typeLeb=typeLeb&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
		MovieRelated=MovieRelated&"<td width="""&(picwidth+20)&"""><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></td></a>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 3
		MovieRelated=MovieRelated&"<td width="""&(100/TdVolume)&"%""><table width=""100%"" border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td><table border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" bgcolor="""&BgColor&""" background="""&BgPic&""" style=""border: 1px solid "&BorderColor&";"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center""><a href="""&movieurl&""" "&OpenS&" title="""&RS("MovieName")&"""><img src="""&RS("MoviePic")&""" alt="""&RS("MovieName")&""" width="""&picwidth&""" height="""&picheight&""" border=""0""></a></td>" &vbcrlf
        MovieRelated=MovieRelated&"</tr>" &vbcrlf
       	MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		MovieRelated=MovieRelated&"</tr><tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td align=""center"" valign=""top"" style=""line-height: 20px;"">"
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a><br />" &vbcrlf
		end if
		if ShowActor<>"" then
		MovieRelated=MovieRelated&"主演:"&Actor(RS("MovieActor"),ActorVolume,OpenS)&"<br />" &vbcrlf
		end if
		if ShowRegion<>"" then
        MovieRelated=MovieRelated&"地区:"&RegionName(RS("MovieRegion"),OpenS)&"<br />" &vbcrlf
		end if
		if Showtype<>"" then
        MovieRelated=MovieRelated&"类型:"&ClassName(RS("TypeID"),classurl,OpenS)&"<br />" &vbcrlf
		end if
		if ShowCoin<>"" then
        MovieRelated=MovieRelated&"影币:"&RS("MovieCoin")&"<br />" &vbcrlf
		end if
		if ShowClick<>"" then
        MovieRelated=MovieRelated&"观看次数:"&RS("MovieClick")&"次<br />" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"添加时间:"&timedate(RS("MovieDate"))&"<br />" &vbcrlf
		end if
		if ShowContent<>"" then
        MovieRelated=MovieRelated&"剧情看点:"&zf(RS("MovieContent"),ContentVolume,"")&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		Case 4
		MovieRelated=MovieRelated&"<td><table width=""100%"" border=""0"" cellspacing=""2"" cellpadding=""0"">" &vbcrlf
        MovieRelated=MovieRelated&"<tr>" &vbcrlf
        MovieRelated=MovieRelated&"<td width=""70"" style=""line-height: 20px;"">["&RegionName(RS("MovieRegion"),OpenS)&"]</td>" &vbcrlf
		if ShowTitle<>"" then
		MovieRelated=MovieRelated&"<td><a href="""&movieurl&""" "&OpenS&" class="""&TitleStyle&""" title="""&RS("MovieName")&""">"&zf(RS("MovieName"),TitleVolume,"")&"</a></td>" &vbcrlf
		end if
		if ShowDate<>"" then
        MovieRelated=MovieRelated&"<td width=""70"">"&timedate(RS("MovieDate"))&"</td>" &vbcrlf
		end if
  		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table></td>" &vbcrlf
		end Select
		if i mod TdVolume = 0 then MovieRelated=MovieRelated&"</tr><tr>" &vbcrlf
		RS.movenext     
		loop
		RS.close
		Set RS = Nothing
		MovieRelated=MovieRelated&"</tr>" &vbcrlf
		MovieRelated=MovieRelated&"</table>"
end function
function MovieActor(ActorStyle,OpenStyle)
MovieActor="<script language=""JavaScript"" src="""&GetConfig("WebiInstallDir")&"Function/ajaxrequest.js""></script>"
MovieActor=MovieActor&"<span id=""MovieActor""><img src="""&GetConfig("WebiInstallDir")&"Function/Images/wait.gif"" border=""0"">正在读取</span>" &vbcrlf
MovieActor=MovieActor&"<Script language=""JavaScript"">" &vbcrlf
MovieActor=MovieActor&"function mycallback(obj) {" &vbcrlf
MovieActor=MovieActor&"document.getElementById(""MovieActor"").innerHTML=obj.responseText;" &vbcrlf
MovieActor=MovieActor&"}" &vbcrlf
MovieActor=MovieActor&"var ajax=new AJAXRequest({" &vbcrlf
MovieActor=MovieActor&"url: """&GetConfig("WebiInstallDir")&"Function/MovieActor.asp?yanyuan="&movc(3,0)&"&OpenStyle="&OpenStyle&"&ActorStyle="&ActorStyle&"""," &vbcrlf
MovieActor=MovieActor&"method: ""GET""," &vbcrlf
MovieActor=MovieActor&"oncomplete: mycallback," &vbcrlf
MovieActor=MovieActor&"charset: ""GB2312""" &vbcrlf
MovieActor=MovieActor&"});" &vbcrlf
MovieActor=MovieActor&"ajax.get();" &vbcrlf
MovieActor=MovieActor&"</script>"
end function
function MovieComments(CommentsVolume)
MovieComments=MovieComments&"<SCRIPT src="""&GetConfig("WebiInstallDir")&"Users/Users_Comments.asp?MovieID="&movc(0,0)&"&CommentsVolume="&CommentsVolume&""" type=text/javascript></SCRIPT>"
MovieComments=MovieComments&"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""3"">" &vbcrlf
MovieComments=MovieComments&"<form action="""&GetConfig("WebiInstallDir")&"Users/Users_SaverComments.asp"" method=""post"" name=""form"" id=""form"" onSubmit=""return process_comment(this);"">" &vbcrlf
MovieComments=MovieComments&"<tr>" &vbcrlf
MovieComments=MovieComments&"<td width=""40"">内容:</td>" &vbcrlf
MovieComments=MovieComments&"<td><textarea name=""CommentsContent"" rows=""8"" wrap=""virtual"" id=""textarea"" style=""width:100%""></textarea></td>" &vbcrlf
MovieComments=MovieComments&"<td style=""width: 180px"">" &vbcrlf
for i=1 to 20
if len(i)=1 then a="0" & i else a=i
MovieComments=MovieComments&"<img src="""&GetConfig("WebiInstallDir")&"function/faces/"&a&".gif"" border=0 onclick=""insertface('[face"&a&"]')"">"
next
MovieComments=MovieComments&"</td>" &vbcrlf
MovieComments=MovieComments&"</tr>" &vbcrlf
MovieComments=MovieComments&"<tr>" &vbcrlf
MovieComments=MovieComments&"<td colspan=""3"" align=""center"">" &vbcrlf
MovieComments=MovieComments&"<input name=""ID"" type=""hidden"" id=""reviewname"" value="""&movc(0,0)&""" />" &vbcrlf
MovieComments=MovieComments&"<input type=""submit"" name=""Submit"" value="" 提交 "" />" &vbcrlf
MovieComments=MovieComments&"<input name=""Reset"" type=""reset"" id=""Reset"" value="" 重置 "" /></td>" &vbcrlf
MovieComments=MovieComments&"</tr>" &vbcrlf
MovieComments=MovieComments&"</form>" &vbcrlf
MovieComments=MovieComments&"</table>" &vbcrlf
MovieComments=MovieComments&"<div style=""PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px"" align=""right""><a href="""&GetConfig("WebiInstallDir")&"Users/Users_index.asp?Url=Users_AllComments.asp?MovieID="&movc(0,0)&""" target=""_blank"">更多评论</a></div>" &vbcrlf
MovieComments=MovieComments&"<script language=""JavaScript"" type=""text/javascript"">" &vbcrlf
MovieComments=MovieComments&"function process_comment(form) {" &vbcrlf
MovieComments=MovieComments&"if (form.CommentsContent.value=='') {" &vbcrlf
MovieComments=MovieComments&"alert(""请填写内容!"");" &vbcrlf
MovieComments=MovieComments&"form.CommentsContent.focus();" &vbcrlf
MovieComments=MovieComments&"return false;" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"function insertface(smileface)" &vbcrlf
MovieComments=MovieComments&"{" &vbcrlf
MovieComments=MovieComments&"document.form.CommentsContent.value+=smileface;" &vbcrlf
MovieComments=MovieComments&"}" &vbcrlf
MovieComments=MovieComments&"</script>" &vbcrlf
end function
function FlashSlide(typeid,Style,Slidewidth,Slideheight)
select case Style
Case 1
FlashSlide="<script type=""text/javascript"">" &vbcrlf
FlashSlide=FlashSlide&"var focus_width="&Slidewidth&"" &vbcrlf
FlashSlide=FlashSlide&"var focus_height="&Slideheight&"" &vbcrlf
FlashSlide=FlashSlide&"var text_height=0" &vbcrlf
FlashSlide=FlashSlide&"var swf_height = focus_height+text_height" &vbcrlf

Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 6 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
FlashSlide=FlashSlide&"imgUrl"&i&"="""&RS("SlidePic")&""";" &vbcrlf
FlashSlide=FlashSlide&"imgtext"&i&"="""&RS("SlideName")&""";" &vbcrlf
FlashSlide=FlashSlide&"imgLink"&i&"=escape("""&RS("SlideUrl")&""");" &vbcrlf
pic=pic&"imgUrl"&i&"+""|""+"
links=links&"imgLink"&i&"+""|""+"
texts=texts&"imgtext"&i&"+""|""+"
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide=FlashSlide&"var pics="&left(pic,clng(len(pic))-5) &vbcrlf
FlashSlide=FlashSlide&"var links="&left(links,clng(len(links))-5) &vbcrlf
FlashSlide=FlashSlide&"var texts="&left(texts,clng(len(texts))-5) &vbcrlf
FlashSlide=FlashSlide&"document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ focus_width +'"" height=""'+ swf_height +'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/flash.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""#F0F0F0"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""FlashVars"" value=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<embed src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/flash.swf"" wmode=""opaque"" FlashVars=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"" menu=""false"" bgcolor=""#F0F0F0"" quality=""high"" width=""'+ focus_width +'"" height=""'+ focus_height +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />');  document.write('</object>');" &vbcrlf
FlashSlide=FlashSlide&"</script>" &vbcrlf
Case 2
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 6 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
pic=pic&"'"&RS("SlidePic")&"'"&","
title=title&"'"&RS("SlideName")&"'"&","
Link=Link&"'"&RS("SlideUrl")&"'"&","
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide="<DIV style="" OVERFLOW: hidden; WIDTH: "&Slidewidth&"px; HEIGHT: "&Slideheight&"px""><SCRIPT language=JavaScript src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/slideshow.js"" type=text/javascript></SCRIPT>"
FlashSlide=FlashSlide&"<SCRIPT language=JavaScript type=text/javascript>"
FlashSlide=FlashSlide&"var mySlideList = ["&left(pic,clng(len(pic))-1)&"];"
FlashSlide=FlashSlide&"var myAltList = ["&left(title,clng(len(title))-1)&"];"
FlashSlide=FlashSlide&"var myLinkList = ["&left(Link,clng(len(Link))-1)&"];"
FlashSlide=FlashSlide&"var mySlideShow = new SlideShowSize(mySlideList,myAltList,myLinkList,'imgUnit',5000, 'mySlideShow',"&Slidewidth&","&Slideheight&",0,800,600);"
FlashSlide=FlashSlide&"mySlideShow.init();"
FlashSlide=FlashSlide&"mySlideShow.play();"
FlashSlide=FlashSlide&"</SCRIPT></DIV>"
Case 3
FlashSlide="<script type=text/javascript>" &vbcrlf
FlashSlide=FlashSlide&"var pic_width="&Slidewidth&"; //图片宽度" &vbcrlf
FlashSlide=FlashSlide&"var pic_height="&Slideheight&"; //图片高度" &vbcrlf
FlashSlide=FlashSlide&"var button_pos=4; //按扭位置 1左 2右 3上 4下" &vbcrlf
FlashSlide=FlashSlide&"var stop_time=3000; //图片停留时间(1000为1秒钟)" &vbcrlf
FlashSlide=FlashSlide&"var show_text=0; //是否显示文字标签 1显示 0不显示" &vbcrlf
FlashSlide=FlashSlide&"var txtcolor=""000000""; //文字色" &vbcrlf
FlashSlide=FlashSlide&"var bgcolor=""DDDDDD""; //背景色" &vbcrlf
FlashSlide=FlashSlide&"var imag=new Array();" &vbcrlf
FlashSlide=FlashSlide&"var link=new Array();" &vbcrlf
FlashSlide=FlashSlide&"var text=new Array();" &vbcrlf
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 5 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
FlashSlide=FlashSlide&"imag["&i&"]="""&RS("SlidePic")&""";" &vbcrlf
FlashSlide=FlashSlide&"text["&i&"]="""&RS("SlideName")&""";" &vbcrlf
FlashSlide=FlashSlide&"link["&i&"]="""&RS("SlideUrl")&""";" &vbcrlf
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide=FlashSlide&"var swf_height=show_text==1?pic_height+20:pic_height;" &vbcrlf
FlashSlide=FlashSlide&"var pics="""", links="""", texts="""";" &vbcrlf
FlashSlide=FlashSlide&"for(var i=1; i<imag.length; i++){" &vbcrlf
FlashSlide=FlashSlide&"pics=pics+(""|""+imag[i]);" &vbcrlf
FlashSlide=FlashSlide&"links=links+(""|""+link[i]);" &vbcrlf
FlashSlide=FlashSlide&"texts=texts+(""|""+text[i]);" &vbcrlf
FlashSlide=FlashSlide&"}" &vbcrlf
FlashSlide=FlashSlide&"pics=pics.substring(1);" &vbcrlf
FlashSlide=FlashSlide&"links=links.substring(1);" &vbcrlf
FlashSlide=FlashSlide&"texts=texts.substring(1);" &vbcrlf
FlashSlide=FlashSlide&"document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,0,0"" width=""'+ pic_width +'"" height=""'+ swf_height +'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""movie"" value="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/Flash.swf"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""quality"" value=""high""><param name=""wmode"" value=""opaque"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""FlashVars"" value=""pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<embed src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/Flash.swf"" FlashVars=""pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+pic_width+'&pic_height='+pic_height+'&show_text='+show_text+'&txtcolor='+txtcolor+'&bgcolor='+bgcolor+'&button_pos='+button_pos+'&stop_time='+stop_time+'"" quality=""high"" width=""'+ pic_width +'"" height=""'+ swf_height +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />');" &vbcrlf
FlashSlide=FlashSlide&"document.write('</object>');" &vbcrlf
FlashSlide=FlashSlide&"</script>" &vbcrlf
Case 4
FlashSlide="<script type=text/javascript>" &vbcrlf
FlashSlide=FlashSlide&"var swf_width="&Slidewidth&"" &vbcrlf
FlashSlide=FlashSlide&"var swf_height="&Slideheight&"" &vbcrlf
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select top 9 SlideName,SlidePic,SlideUrl,SlideIndex from YWNT_TMS_Slide Where"
if typeid<>"" then
sql=sql&" SlideType="&typeid&""
else
sql=sql&" SlideIndex=1"
end if
sql=sql&" Order by SlideWith asc,ID asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
pic=pic&RS("SlidePic")&"|"
links=links&RS("SlideUrl")&"|"
RS.movenext     
loop
RS.close
Set RS = Nothing
FlashSlide=FlashSlide&"var files='"&left(pic,clng(len(pic))-1)&"'" &vbcrlf
FlashSlide=FlashSlide&"var links='"&left(links,clng(len(links))-1)&"'" &vbcrlf
FlashSlide=FlashSlide&"var texts=''" &vbcrlf
FlashSlide=FlashSlide&"document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ swf_width +'"" height=""'+ swf_height +'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""movie"" value="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/Flash.swf""><param name=""quality"" value=""high"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<param name=""FlashVars"" value=""bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'"">');" &vbcrlf
FlashSlide=FlashSlide&"document.write('<embed src="""&GetConfig("WebiInstallDir")&"FlashSlide/Style"&Style&"/Flash.swf"" wmode=""opaque"" FlashVars=""bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu=""false"" quality=""high"" width=""'+ swf_width +'"" height=""'+ swf_height +'"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />'); document.write('</object>');" &vbcrlf
FlashSlide=FlashSlide&"</script>" &vbcrlf
end select
end function
function MoviePlay(PlayStyle,PlayType,Play1Style,Play2Style,Play3Style)
if movc(8,0)<>1 then
MoviePlay=MoviePlay&"该影片已关闭观看"
exit function
else
if PlayType=4 then
Set RS = Server.CreateObject(YWNT_TMS_RS)
RS.Open ("Select P2PType From YWNT_TMS_Sever Where ID="&movc(15,0)&""), Conn, 1, 1
P2PType = RS("P2PType")
RS.Close
Set RS = Nothing
PlayType=P2PType+3
end if
select case PlayType
Case 4
'bobop2p
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=3
playweb="PlayerP2PBobo.asp"
Case 5
'原力p2p
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select filmid from p2pfilm where MovieID="&movc(0,0)&" order by filmid asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=4
playweb="PlayerP2PForceTech.asp"
Case 6
'Qvod
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=5
playweb="PlayerQvod.asp"
Case 7
'讯雷看看
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=6
playweb="PlayerXunlei.asp"
Case 8
'NEO泥巴网络
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=7
playweb="PlayerNeo.asp"
Case 9
'OTV网络电视
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_P2PUrl where MovieID="&movc(0,0)&" order by ID asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=8
playweb="PlayerOtv.asp"
Case else
'普通
Set rsurl=Server.CreateObject(YWNT_TMS_RS)
sql="select ID from YWNT_TMS_MovieUrl where MovieID="&movc(0,0)&" order by id asc"
rsurl.open sql,conn,1,1
if rsurl.eof then
MoviePlay=MoviePlay&"暂时没有提供该线路观看地址"
exit function
else
url=rsurl.GetRows()
Moviefor=True
end if
rsurl.close
Set rsurl=Nothing
MovieType=1
IF movc(16,0)=3 Then
playweb="PlayCollect.asp" '小偷
ElseIF movc(16,0)=4 Then
playweb="PlayFramework.asp"	'框架
Else
IF GetSysPlay("MovieType")=0 Then
playweb="Play.asp"
Else
playweb="PlayPower.asp"
End IF
End IF
end select

if Moviefor=True then
for c=1 to Ubound(url,2)+1
MoviePlay=MoviePlay&"<div style=""width:60px;float:left;text-align:center;""><a href=""javascript:OpenWindow('"&GetConfig("WebiInstallDir")&playweb&"?ID="&movc(0,0)&"&UrlID="&url(0,c-1)&"&MovieType="&MovieType&"&SeverType="&PlayType&"')"" class="""&PlayStyle&""" title="""&movc(2,0)&"第"&c&"集"""">"
if Ubound(url,2)<=2 then
if PlayStyle=0 then
MoviePlay=MoviePlay&"第"&c&"集</a></div>"
else
if c=1 then
MoviePlay=MoviePlay&"<img src="""&Play1Style&""" border=""0""></a></div>"
elseif c=2 then
MoviePlay=MoviePlay&"<img src="""&Play2Style&""" border=""0""></a></div>"
elseif c=3 then
MoviePlay=MoviePlay&"<img src="""&Play3Style&""" border=""0""></a></div>"
end if
end if
else
MoviePlay=MoviePlay&"第"&c&"集</a></div>"
end if
next
end if
end if
end function

function MovieDown(DownType,DownStyle)
On Error Resume Next
select case GetSysPlay("MovieBtDown")
Case 0
if movc(9,0)<>1 then
MovieDown="该影片已关闭下载"
exit function
else
MovieType=2
playweb="Down.asp"
MovieDown="<a href=""javascript:OpenWindow('"&GetConfig("WebiInstallDir")&playweb&"?ID="&movc(0,0)&"&MovieType="&MovieType&"')"" class="""&DownStyle&""" title="""&movc(2,0)&"下载"""">"
if DownType=1 then
MovieDown=MovieDown&"<img src="""&DownStyle&""" border=""0""></a>"
else
MovieDown=MovieDown&"点击下载</a>"
end if
end if
Case 1
MovieDown="<a href=""http://down.ywnt.net/movie_search.php?keywords="&toUTF8(movc(2,0))&"&id=0&st=1&subcondid=0&l_s=4"" target=""_blank"" title="""&movc(2,0)&"下载"""">BT联盟下载该影片</a>"
end select
end function

Function toUTF8(szInput)
    Dim wch, uch, szRet
    Dim x
    Dim nAsc, nAsc2, nAsc3
    If szInput = "" Then
        toUTF8 = szInput
        Exit Function
    End If
     For x = 1 To Len(szInput)
        wch = Mid(szInput, x, 1)
        nAsc = AscW(wch)
        If nAsc < 0 Then nAsc = nAsc + 65536
    
        If (nAsc And &HFF80) = 0 Then
            szRet = szRet & wch
        Else
            If (nAsc And &HF000) = 0 Then
                uch = "%" & Hex(((nAsc \ 2 ^ 6)) Or &HC0) & Hex(nAsc And &H3F Or &H80)
                szRet = szRet & uch
            Else
                uch = "%" & Hex((nAsc \ 2 ^ 12) Or &HE0) & "%" & _
                            Hex((nAsc \ 2 ^ 6) And &H3F Or &H80) & "%" & _
                            Hex(nAsc And &H3F Or &H80)
                szRet = szRet & uch
            End If
        End If
    Next
        
    toUTF8 = szRet
End Function

function featureleb(Style,Volume,TdVolume,FStyle,picwidth,picheight,OpenStyle)
featureleb="<table width=""100%""  border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
featureleb=featureleb&"<tr>" &vbcrlf
Set Rs = server.CreateObject(YWNT_TMS_RS)
sql="Select top "&Volume&" ID,FeatureName,FeatureNameE,FeaturePIC from YWNT_TMS_FeatureClass Order by FeatureWith asc,id asc"
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
if OpenStyle=1 then
OpenS="target=""_blank"""
end if
Select Case GetConfig("WebHtmlMode")
Case "asp"
Featureurl="Feature.asp?Template="&RS("ID")
Case else
Featureurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"ZT_"&RS("FeatureNameE")&"."&GetConfig("WebHtmlMode")
end Select
Select Case Style
Case 1
featureleb=featureleb&"<td><a href="""&Featureurl&""" "&OpenS&"><img src="""&RS("FeaturePIC")&""" width="""&picwidth&""" height="""&picheight&""" border=""0"" class="""&FStyle&"""></a></td>"&vbcrlf
Case 2
featureleb=featureleb&"<td><a href="""&Featureurl&""" "&OpenS&" class="""&FStyle&""">"&RS("FeatureName")&"</a></td>" &vbcrlf
end Select
if i mod TdVolume = 0 then featureleb=featureleb&"</tr><tr>" &vbcrlf
RS.movenext     
loop
RS.close     
set RS=nothing
featureleb=featureleb&"</tr>" &vbcrlf
featureleb=featureleb&"</table>" &vbcrlf
end function

function NoticeLeb(Volume,TdVolume,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhoto,HjPhoto)
		NoticeLeb="<script language=""JavaScript"" src="""&GetConfig("WebiInstallDir")&"Function/ajaxrequest.js""></script>"
		NoticeLeb=NoticeLeb&"<span id=""NoticeLeb""><img src="""&GetConfig("WebiInstallDir")&"Function/Images/wait.gif"" border=""0"">正在读取</span>" &vbcrlf
		NoticeLeb=NoticeLeb&"<Script language=""JavaScript"">" &vbcrlf
		NoticeLeb=NoticeLeb&"function mycallback(obj) {" &vbcrlf
		NoticeLeb=NoticeLeb&"document.getElementById(""NoticeLeb"").innerHTML=obj.responseText;" &vbcrlf
		NoticeLeb=NoticeLeb&"}" &vbcrlf
		NoticeLeb=NoticeLeb&"var ajax=new AJAXRequest({" &vbcrlf
		NoticeLeb=NoticeLeb&"url: """&GetConfig("WebiInstallDir")&"Function/NoticeLeb.asp?Volume="&Volume&"&TdVolume="&TdVolume&"&TitleStyle="&TitleStyle&"&TitleVolume="&TitleVolume&"&ShowDate="&ShowDate&"&OpenStyle="&OpenStyle&"&DhPhoto="&DhPhoto&"&HjPhoto="&HjPhoto&"""," &vbcrlf
		NoticeLeb=NoticeLeb&"method: ""GET""," &vbcrlf
		NoticeLeb=NoticeLeb&"oncomplete: mycallback," &vbcrlf
		NoticeLeb=NoticeLeb&"charset: ""GB2312""" &vbcrlf
		NoticeLeb=NoticeLeb&"});" &vbcrlf
		NoticeLeb=NoticeLeb&"ajax.get();" &vbcrlf
		NoticeLeb=NoticeLeb&"</script>"
end function

function HelpLeb(Volume,TdVolume,TitleStyle,TitleVolume,ShowDate,OpenStyle,DhPhoto,HjPhoto)
		HelpLeb="<script language=""JavaScript"" src="""&GetConfig("WebiInstallDir")&"Function/ajaxrequest.js""></script>"
		HelpLeb=HelpLeb&"<span id=""HelpLeb""><img src="""&GetConfig("WebiInstallDir")&"Function/Images/wait.gif"" border=""0"">正在读取</span>" &vbcrlf
		HelpLeb=HelpLeb&"<Script language=""JavaScript"">" &vbcrlf
		HelpLeb=HelpLeb&"function mycallback(obj) {" &vbcrlf
		HelpLeb=HelpLeb&"document.getElementById(""HelpLeb"").innerHTML=obj.responseText;" &vbcrlf
		HelpLeb=HelpLeb&"}" &vbcrlf
		HelpLeb=HelpLeb&"var ajax=new AJAXRequest({" &vbcrlf
		HelpLeb=HelpLeb&"url: """&GetConfig("WebiInstallDir")&"Function/HelpLeb.asp?Volume="&Volume&"&TdVolume="&TdVolume&"&TitleStyle="&TitleStyle&"&TitleVolume="&TitleVolume&"&ShowDate="&ShowDate&"&OpenStyle="&OpenStyle&"&DhPhoto="&DhPhoto&"&HjPhoto="&HjPhoto&"""," &vbcrlf
		HelpLeb=HelpLeb&"method: ""GET""," &vbcrlf
		HelpLeb=HelpLeb&"oncomplete: mycallback," &vbcrlf
		HelpLeb=HelpLeb&"charset: ""GB2312""" &vbcrlf
		HelpLeb=HelpLeb&"});" &vbcrlf
		HelpLeb=HelpLeb&"ajax.get();" &vbcrlf
		HelpLeb=HelpLeb&"</script>"
end function

function UserLoginLeb(LableType,LoginDisStyle,BGStyle,TextStyle,ButtonStyle,Reg_LinkCss,Get_PassCss,Out_LinkCss,Users_LinkCss)
		UserLoginLeb="<iframe src="""&GetConfig("WebiInstallDir")&"Users/Users_Login.asp?LableType="&LableType&"&LoginDisStyle="&LoginDisStyle&"&BGStyle="&BGStyle&"&TextStyle="&TextStyle&"&ButtonStyle="&ButtonStyle&"&Reg_LinkCss="&Reg_LinkCss&"&Get_PassCss="&Get_PassCss&"&Out_LinkCss="&Out_LinkCss&"&Users_LinkCss="&Users_LinkCss&"&CssID="&CssID&""" frameborder=""0"" width=""100%""  name=""Login"" onload=""document.all('Login').style.height=Login.document.body.scrollHeight;"" scrollong=""no"" marginheight=""0"" marginwidth=""0""></iframe>"
end function

function SearchInputLeb(LableType,SearchDisStyle,BGStyle,TextStyle,SelectStyle,ButtonStyle)
SearchInputLeb=SearchInputLeb&"<SCRIPT>" &vbcrlf
SearchInputLeb=SearchInputLeb&"function formcheck()" &vbcrlf
SearchInputLeb=SearchInputLeb&"{" &vbcrlf
SearchInputLeb=SearchInputLeb&"if (searchform.Keyword.value=="""")" &vbcrlf
SearchInputLeb=SearchInputLeb&"{" &vbcrlf
SearchInputLeb=SearchInputLeb&"alert('请输入搜索内容!');" &vbcrlf
SearchInputLeb=SearchInputLeb&"searchform.Keyword.focus();" &vbcrlf
SearchInputLeb=SearchInputLeb&"return false;" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"</SCRIPT>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<style type=""text/css"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<!--" &vbcrlf
SearchInputLeb=SearchInputLeb&".td {" &vbcrlf
SearchInputLeb=SearchInputLeb&"font-size: 12px;" &vbcrlf
SearchInputLeb=SearchInputLeb&"color: #333333;" &vbcrlf
SearchInputLeb=SearchInputLeb&"}" &vbcrlf
SearchInputLeb=SearchInputLeb&"-->" &vbcrlf
SearchInputLeb=SearchInputLeb&"</style>" &vbcrlf
If IsPicTF(BGStyle)=True Then
	DivBgStyle = " style=""background-image:url(" & BGStyle & ");"""
Else
	DivBgStyle = " class=""" & BGStyle & """"
End If
select case SearchDisStyle
Case 0
SearchInputLeb=SearchInputLeb&"<table border=""0"" cellspacing=""0"" cellpadding=""0"" "&DivBgStyle&">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<form name=""searchform"" action="""&GetConfig("WebiInstallDir")&"search.asp"" method=""post"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25"" colspan=""2"" align=""center"" class=""td"">影片搜索:" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input name=""Keyword"" type=""text"" class="""&TextStyle&"""></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr align=""center"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25""><select name=""searchtype"" class="""&SelectStyle&""">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""1"">按名称查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""2"">按演员查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""3"">按全部查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</select>&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input onClick=""return formcheck();"" size=""10"" "
if IsPicTF(ButtonStyle)=True then 
SearchInputLeb=SearchInputLeb&"type=""image"" src="""&ButtonStyle&""" "
else 
SearchInputLeb=SearchInputLeb&"type=""submit"" class="""&ButtonStyle&""" value=""搜索"""
end if
SearchInputLeb=SearchInputLeb&"></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</form>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</table>" &vbcrlf
Case 1
SearchInputLeb=SearchInputLeb&"<table border=""0"" cellpadding=""0"" cellspacing=""0"" "&DivBgStyle&">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<form name=""searchform"" action="""&GetConfig("WebiInstallDir")&"search.asp"" method=""post"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<td height=""25"" align=""center"" class=""td"">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input name=""Keyword"" type=""text"" class="""&TextStyle&""">&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<select name=""searchtype"" class="""&SelectStyle&""">" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""1"">按名称查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""2"">按演员查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<option value=""3"">按全部查找</option>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</select>&nbsp;" &vbcrlf
SearchInputLeb=SearchInputLeb&"</td><td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"<input onClick=""return formcheck();"" "
if IsPicTF(ButtonStyle)=True then 
SearchInputLeb=SearchInputLeb&"type=""image"" src="""&ButtonStyle&""""
else 
SearchInputLeb=SearchInputLeb&"type=""submit"" class="""&ButtonStyle&""" value=""搜索"""
end if
SearchInputLeb=SearchInputLeb&"></td>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</tr>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</form>" &vbcrlf
SearchInputLeb=SearchInputLeb&"</table>" &vbcrlf
end select 
end function

function SetHome()
SetHome="<a href=""#"" onClick=""this.style.behavior='url(#default#homepage)';this.setHomePage('"&GetConfig("Weburl")&"');"" onMouseOut=""window.status='"&GetConfig("WebName")&"';return true;"" onMouseOver=""window.status='将本站设定为您的首页';return true;"">设为首页</a>"
end function

function SetCollection()
SetCollection="<a href=""#"" onClick=""javascript:window.external.addFavorite('"&GetConfig("Weburl")&"','"&GetConfig("WebName")&"');return false;"" onMouseOut=""window.status='"&GetConfig("WebName")&"';return true;"" onMouseOver=""window.status='将本站加入您的收藏夹';return true;"">加入收藏</a>"
end function

function SetupDir()
SetupDir=GetConfig("WebiInstallDir")
end function

function WebUrlW()
WebUrlW=GetConfig("WebUrl")
end function

function WebNameW()
WebNameW=GetConfig("WebName")
end function

function Vote(ID)
Vote="<script language=""javascript"" src="""&GetConfig("WebiInstallDir")&"Function/vote.asp?id="&ID&"""></script>"
end function

function Ad(ID)
Ad="<script language=""javascript"" src="""&GetConfig("WebiInstallDir")&"AD/Ad.asp?id="&ID&"""></script>"
end function

function LinkLeb(Style,Volume,TdVolume)
LinkLeb="<table width=""100%""  border=""0"" cellspacing=""5"" cellpadding=""0"">" &vbcrlf
LinkLeb=LinkLeb&"<tr>" &vbcrlf
Set Rs = server.CreateObject(YWNT_TMS_RS)
Select Case Style
Case 1
sql="Select top "&Volume&" LinkUrl,LinkPic from YWNT_TMS_Link where LinkType=1 and LinkAudit=1 Order by LinkWith asc,id desc"
Case 2
sql="Select top "&Volume&" LinkName,LinkUrl from YWNT_TMS_Link where LinkType=0 and LinkAudit=1 Order by LinkWith asc,id desc"
end Select
Rs.open sql,Conn,1,1
do while not RS.eof
i=i+1
Select Case Style
Case 1
LinkLeb=LinkLeb&"<td><a href="""&RS("LinkUrl")&""" target=""_blank""><img src="""&RS("LinkPic")&""" width="""&GetLink("LinkPicWidth")&""" height="""&GetLink("LinkPicHeight")&""" border=""0""></a></td>" &vbcrlf
Case 2
LinkLeb=LinkLeb&"<td><a href="""&RS("LinkUrl")&""" target=""_blank"">"&RS("LinkName")&"</a></td>" &vbcrlf
end Select
if i mod TdVolume = 0 then LinkLeb=LinkLeb&"</tr><tr>" &vbcrlf
RS.movenext     
loop
RS.close     
set RS=nothing
LinkLeb=LinkLeb&"</tr>" &vbcrlf
LinkLeb=LinkLeb&"</table>" &vbcrlf
end function

function NavLeb(ClassType,LinkCss,margin,Segregation,ShowLive,ShowFree,ShowAll,OpenStyle,Typeid)
if OpenStyle=1 then
OpenS="target=""_blank"""
end if
Set Rs=Server.CreateObject(YWNT_TMS_RS)
Select Case ClassType
Case 1
sql="select ID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ClassID=0 Order by ClassWith asc,id desc"
NavLeb="<a href="""&GetConfig("Weburl")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">首页</a>"&Segregation
IF ShowLive<>"" Then
NavMei=Segregation&"<a class="""&LinkCss&""" href=""#"" style=""margin-right:"&margin&";margin-left:"&margin&""" onClick=""window.open('"&GetConfig("WebiInstallDir")&"Live/live.asp','Tvwindow', 'height=463, width=702, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');"">直播</a>"
End IF
IF GetConfig("WebHtmlMode")<>"asp" Then

IF ShowFree<>"" Then
NavMei=NavMei&Segregation&"<a href="""&GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"Freemovie."&GetConfig("WebHtmlMode")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">免费试看</a>"
End IF

IF ShowAll<>"" Then
NavMei=NavMei&Segregation&"<a href="""&GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&"Allmovie."&GetConfig("WebHtmlMode")&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">全部影片</a>"
End IF

Else

IF ShowFree<>"" Then
NavMei=NavMei&Segregation&"<a href="""&GetConfig("WebiInstallDir")&"Freemovie.asp"" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">免费试看</a>"
End IF

IF ShowAll<>"" Then
NavMei=NavMei&Segregation&"<a href="""&GetConfig("WebiInstallDir")&"Allmovie.asp"" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">全部影片</a>"
End IF

End If

Case 2
if Typeid="" or Typeid=0 then exit function
sql="select ID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ClassID="&Typeid&" Order by ClassWith asc,id desc"
End Select
Rs.open sql,Conn,1,1
if RS.eof then
Set RsClass=Server.CreateObject(YWNT_TMS_RS)
SqlClass="select ClassID from YWNT_TMS_MovieClass where ID="&Typeid&" Order by ClassWith asc,id desc"
RsClass.open SqlClass,Conn,1,1
TypeidX=RsClass("ClassID")
RsClass.close   
set RsClass=nothing
NavLeb=NavLeb(ClassType,LinkCss,margin,Segregation,"","","",OpenStyle,TypeidX)
exit function
else
do while not RS.eof
Select Case GetConfig("WebHtmlMode")
Case "asp"
classurl="Class.asp?ID="&RS("ID")
Case else
classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&RS("ClassNameE")&"."&GetConfig("WebHtmlMode")
end Select
NavLeb=NavLeb&"<a href="""&classurl&""" "&OpenS&" class="""&LinkCss&""" style=""margin-right:"&margin&";margin-left:"&margin&""">"&RS("ClassName")&"</a>"
RS.movenext
if not rs.eof then 
NavLeb=NavLeb&Segregation
end if
loop
NavLeb=NavLeb&NavMei
end if
RS.close   
set RS=nothing
end function

function TvLeb(Tvname,CssClass)
TvLeb="<a class="""&CssClass&""" href=""#"" onClick=""window.open('"&GetConfig("WebiInstallDir")&"Live/live.asp','Tvwindow', 'height=463, width=702, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');"">"
If IsPicTF(Tvname)=True Then
TvLeb=TvLeb&"<img src="""&Tvname&""" border=""0"">"
else
TvLeb=TvLeb&Tvname
end if
TvLeb=TvLeb&"</a>"
end function

function Tophtml(Keywords,Description,Title,Css,Content)
Tophtml=Tophtml&"<html>" &vbcrlf
Tophtml=Tophtml&"<head>" &vbcrlf
Tophtml=Tophtml&"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />" &vbcrlf
Tophtml=Tophtml&"<meta name=""Keywords"" content="""&Keywords&""" />" &vbcrlf
Tophtml=Tophtml&"<meta name=""Description"" content="""&Description&""" />" &vbcrlf
Tophtml=Tophtml&"<title>"&title&"</title>" &vbcrlf
Tophtml=Tophtml&"<LINK href="""&GetConfig("WebiInstallDir")&"css.asp?ID="&Css&""" type=text/css rel=stylesheet>"
Tophtml=Tophtml&"</head>" &vbcrlf
Tophtml=Tophtml&"<body>" &vbcrlf
Tophtml=Tophtml&Content &vbcrlf
Tophtml=Tophtml&"</body>" &vbcrlf
Tophtml=Tophtml&"</html>"
end function

function Location(Style,TemplateType,Typeid)
Location="<a href="""&GetConfig("Weburl")&""" class="""&Style&""">首页</a>"
Select Case TemplateType
Case 2,3
Location=Location&ClassLocation(Typeid,Style)
Case 4
Location=Location&ClassLocation(movc(1,0),Style)&" - <a href=""#"" class="""&Style&""">"&movc(2,0)&"</a>"
Case 5
Location=Location&" - <a href=""#"" class="""&Style&""">专题栏目</a> - <a href=""#"" class="""&Style&""">"&FeatureNameW&"</a>"
Case 6
IF Request("searchtype")=1 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找影片</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=2 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找演员</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=3 Then
Location=Location&" - <a href=""#"" class="""&Style&""">查找关键字</a> - <a href=""#"" class="""&Style&""">"&Request("Keyword")&"</a>"
ElseIF Request("searchtype")=4 Then
Location=Location&" - <a href=""#"" class="""&Style&""">地区分类</a> - "&RegionName(Request("Keyword"),"")
End IF
Case 7
Location=Location&" - <a href=""#"" class="""&Style&""">免费试看</a>"
Case 8
Location=Location&" - <a href=""#"" class="""&Style&""">全部影片</a>"
end Select
end function

Function ClassLocation(Typeid,Style)
Set RsClass=Server.CreateObject(YWNT_TMS_RS)
SqlClass="select ID,ClassID,ClassName,ClassNameE from YWNT_TMS_MovieClass where ID="&Typeid&" Order by  id desc"
RsClass.open SqlClass,Conn,1,1
if not RsClass.eof then 
Select Case GetConfig("WebHtmlMode")
Case "asp"
classurl="Class.asp?ID="&RsClass("ID")
Case else
classurl=GetConfig("WebiInstallDir")&GetConfig("HtmlDIr")&RsClass("ClassNameE")&"."&GetConfig("WebHtmlMode")
end Select
ClassLocation=ClassLocation(RsClass("ClassID"),Style)&" - <a href="""&classurl&""" class="""&Style&""">"&RsClass("ClassName")&"</a>" &vbcrlf
end if
RsClass.close
set RsClass=nothing
End Function
%>